package vek.XML.parsedObjects;

import vek.Objects.Openinghours;

/**
 * Class to contain the opening hours data read from the XML files.
 * @see Openinghours
 * @author Christian, Michal og Jakob (Hold 1, gruppe 2)
 */
public class ParsedOpeninghours {
    
    public int[] weekStartTimes = new int[7]; //sunday == weekStartTimes[0]
    public int[] weekEndTimes = new int[7]; //sunday == weekEndTimes[0]
    
    /**
     * 
     * @param weekstart Array containing the times where the POI opens
     * @param weekend Array contaning the times where the POI closes.
     */ 
    
    public ParsedOpeninghours(int[] weekstart, int[] weekend)
    {
        weekStartTimes = weekstart;
        weekEndTimes = weekend;
    }
    
    /**
     * Gets this object as a string, used solely for debugging purposes.
     * @return all the start and end times for all the weekdays.
     */
    
    public String toString()
    {
        return "Mo: " + weekStartTimes[1] + "-" + weekEndTimes[1] + " Tu: "
                + weekStartTimes[2] + "-" + weekEndTimes[2] + " We: "
                + weekStartTimes[3] + "-" + weekEndTimes[3] + " Th: "
                + weekStartTimes[4] + "-" + weekEndTimes[4] + " Fr: "
                + weekStartTimes[5] + "-" + weekEndTimes[5] + " Sa: "
                + weekStartTimes[6] + "-" + weekEndTimes[6] + " Su: "
                + weekStartTimes[0] + "-" + weekEndTimes[0];
    }

}
